<template>
  <!-- 方法的默认第一个参数是$event -->
  <div>

    <!-- <button @click="test">异步调用</button>
    <button @click="test1">异步调用1</button> -->

    <button @click="getAsyncCount">异步调用2</button>
    <button @click="getAsyncCount1(123)">异步调用3</button>
  </div>
</template>

<script>
import { mapActions } from 'vuex'
export default {
  methods: {

    // test() {
    //   this.$store.dispatch("getAsyncCount")
    // },
    // test1() {
    //   this.$store.dispatch("getAsyncCount1", 123)
    // }
    ...mapActions(['getAsyncCount', 'getAsyncCount1'])
  }
}
</script>

<style>

</style>